package com.xhwl.logistics.bo.input;

import com.xhwl.common.pojo.cent.vehicle.VehcPayRecord;
import com.xhwl.logistics.util.AboutDateUtil;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.beans.BeanUtils;

@Setter
@Getter
@ToString
public class PayFeeInfoBO {

    private String parkId;

    private String plateNo;

    private String cardNo;

    private String plateColor;

    private String billId;

    private String orderNo;

    private String paymentOrderNo;

    private String entryTime;

    private String payTime;

    private Integer freeTime;

    private Integer paySource;

    private Integer payType;

    private Integer payMethod;

    private Integer totalMoney;

    private Integer paidMoney;

    private Integer freeMoney;

    public VehcPayRecord toVehcPayRecord(Integer projectId) {
        VehcPayRecord vehcPayRecord = new VehcPayRecord();

        BeanUtils.copyProperties(this, vehcPayRecord, "entryTime", "payTime");

        vehcPayRecord.setProjectId(projectId);

        vehcPayRecord.setEntryTime(AboutDateUtil.stringToDate(entryTime));
        vehcPayRecord.setPayTime(AboutDateUtil.stringToDate(payTime));

        return vehcPayRecord;
    }

}
